import request from '@/axios/axios.js'

// 查询
export const searchApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/backup/purchase/list',
        data: params
    })
}
// 查看详情
export const infoApi = (params) => {
    return request({
        method: 'get',
        url: 'dms/backup/purchase/getInfo',
        params: params
    })
}
// 查看入库 信息
export const infoBeputinstorageApi = (params) => {
    return request({
        method: 'get',
        url: 'dms/backup/beputinstorage/list',
        params: params
    })
}

// 新增采购单
export const addApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/backup/purchase/add',
        data: params
    })
}

// 入库 
export const  enterApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/backup/beputinstorage/add',
        data: params
    })
}

// 删除
export const deleteApi = (params) => {
    return request({
        method: 'get',
        url: '/dms/backup/purchase/delete',
        params: params
    })
}

// 下载模板
export const templateApi= (params) => {
    return request({
        method: 'get',
        url: 'dms/backup/purchase/template',
        responseType: 'blob',
        params: params
    })
}

// 导出

export const  exportApi= (params) => {
    return request({
        method: 'post',
        url: '/dms/backup/purchase/export',
        responseType: 'blob',
        data: params
    })
}


